#ifndef QT_MATRIX4X4_MANAGER
#define QT_MATRIX4X4_MANAGER

#include <QWidget>
#include <qtpropertybrowser.h>
#include <QMap>
#include <QMatrix4x4>
#include <qtpropertymanager.h>
class QtMatrix4x4Manager : public QtAbstractPropertyManager
{
    Q_OBJECT
public:
    QtMatrix4x4Manager(QObject *parent=0);
    virtual ~QtMatrix4x4Manager();

    QMatrix4x4 value(QtProperty* property_ptr);
    QtDoublePropertyManager * 	subDoublePropertyManager () const;


public slots:
    void setValue(QtProperty * property_ptr, const QMatrix4x4 &value_matrix);
    void slotDoubleChanged(QtProperty *property, double value);
signals:
    void valueChanged(QtProperty*, const QMatrix4x4&);
protected:
    virtual void initializeProperty (QtProperty *property);
    virtual QString	valueText (const QtProperty *property) const;
private:
    QtDoublePropertyManager * 	m_doublePropertyManager;
    QMap<const QtProperty *, QMatrix4x4> m_propertyPtrToMatrix;
    QMap<const QtProperty *, double> m_propertyPtrToSingleStep;


    QMap< const QtProperty*, QtProperty * > m_propertyToX;
    QMap< const QtProperty*, QtProperty * > m_propertyToY;
    QMap< const QtProperty*, QtProperty * > m_propertyToZ;

    QMap< const QtProperty*, QtProperty * > m_propertyToRX;
    QMap< const QtProperty*, QtProperty * > m_propertyToRY;
    QMap< const QtProperty*, QtProperty * > m_propertyToRZ;

    QMap< const QtProperty*, QtProperty * > m_propertyToSX;
    QMap< const QtProperty*, QtProperty * > m_propertyToSY;
    QMap< const QtProperty*, QtProperty * > m_propertyToSZ;

    QMap< const QtProperty*, QtProperty * > m_XToproperty;
    QMap< const QtProperty*, QtProperty * > m_YToproperty;
    QMap< const QtProperty*, QtProperty * > m_ZToproperty;

    QMap< const QtProperty*, QtProperty * > m_RXToproperty;
    QMap< const QtProperty*, QtProperty * > m_RYToproperty;
    QMap< const QtProperty*, QtProperty * > m_RZToproperty;

    QMap< const QtProperty*, QtProperty * > m_SXToproperty;
    QMap< const QtProperty*, QtProperty * > m_SYToproperty;
    QMap< const QtProperty*, QtProperty * > m_SZToproperty;

    QMap< const QtProperty*, QtProperty * > m_propertyToSingleStep;
    QMap< const QtProperty*, QtProperty * > m_SingleStepToproperty;

};

#endif // QT_MATRIX4X4_MANAGER
